package code.generate.singleton;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;


public class ConfigSingleton {

	private Properties properties;

	public Properties getProperties() {
		return properties;
	}

	public void setProperties(Properties properties) {
		this.properties = properties;
	}

	protected ConfigSingleton() {
		properties = new Properties();
		InputStream is = null;
		try {
			is = ConfigSingleton.class
					.getResourceAsStream("/config.properties");
			properties.load(is);
		} catch (Exception e) {
		} finally {
			try {
				is.close();
			} catch (IOException e) {
			}
		}
	}

	public static ConfigSingleton getInstance() {
		return ((ConfigSingleton) SingletonRegistry
				.getInstance(ConfigSingleton.class.getName()));
	}

}